package cn.enjoy.sharding.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * CREATE TABLE `hss_history`  (
 *   `id` bigint NOT NULL,
 *   `type_id` bigint NULL DEFAULT NULL,
 *   `equipment_id` bigint NULL DEFAULT NULL,
 *   `data` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
 *   `parse_data` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
 *   `parse_time` timestamp NULL DEFAULT NULL,
 *   `create_time` timestamp NULL DEFAULT NULL,
 *   PRIMARY KEY (`id`) USING BTREE
 * )
 */
@Data
@TableName("hss_history")
public class HssHistoryEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId
    private Long id;
    private Long typeId;
    private Long equipmentId;
    private String data;
    private String parseData;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date parseTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
//    @TableField(typeHandler = DateLongTypeHandler.class)
    private Date createTime;
}
